home *** CD-ROM | disk | FTP | other *** search
Wrap
/**********************************/ /* Halftone V2.11 */ /* Image Engineer Macro script */ /* by Simon Edwards */ /* 3/6/95 */ /* */ /* This lets you select an alpha */ /* channel image to be scaled and */ /* used as a halftone pattern on */ /* the project. */ /* */ /* MS: now uses zoomlevel of */ /* original picture */ /* */ /**********************************/ Options results signal on error /* Setup a place for errors to go */ if arg()==0 then exit pic=arg(1) PROJECT_INFO pic WIDTH picwidth=result PROJECT_INFO pic HEIGHT picheight=result PROJECT_INFO pic ZOOM origzoomval=result 'FORM "Halftone" "Ok|Cancel"', 'RADIO,"Pattern","Spherical|Vertical|Horizontal|Diagonal|Ordered4|Wavey",0', 'INTEGER,"Size in pixels",4,256,16,SLIDER' parse var result ok reply size . if ok=0 then exit alp = 'IE:Alpha/' select when reply==0 then alp = alp'Spherical.alpha' when reply==1 | reply==2 then alp = alp'Gradient.alpha' when reply==3 then alp = alp'Diagonal.alpha' when reply==4 then alp = alp'Ordered4.alpha' when reply==5 then alp = alp'Wavey.alpha' otherwise exit end 'OPEN "'alp'" 8BIT' alphachannel=result PROJECT_SET alphachannel ZOOM origzoomval 'SCALE' alphachannel size size 'FAST' sizedalpha=RESULT 'CLOSE' alphachannel 'MARK' pic 'PRIMARY' 'MARK' sizedalpha 'ALPHA' 'HALFTONE' 'CLOSE' sizedalpha exit /*******************************************************************/ /* This is where control goes when an error code is returned by IE */ /* It puts up a message saying what happened and on which line */ /*******************************************************************/ error: if RC=5 then do /* Did the user just cancel us? */ IE_TO_FRONT LAST_ERROR 'REQUEST "'||RESULT||'"' exit end else do IE_TO_FRONT LAST_ERROR 'REQUEST "Error detected!!!'||D2C(10)||'Image Engineer error message is as follows'||D2C(10)||result||D2C(10)||'Script failed on line '||SIGL||'"' 'Doh!' exit end